<?php
include_once 'library/confirm/RoleFilterPost.class.php';

$item = new RoleFilterPost();

// FETCHING
$username	=	$_POST['username'];
$password	=	$_POST['password'];

$helper = array(
	'view'		=> 'View',
	'entry'		=> 'View + Entry',
	'manage'	=> 'View + Edit',
	'delete'	=> 'View + Delete',
	'super'		=> 'View + Entry + Edit + Delete',
);

?>
<div class="title">Konfirmasi - Registrasi Akun</div>
<form name="frm_<?=$subbagian;?>" id="frm_<?=$subbagian;?>" method="post" action="index.php?bagian=<?=$bagian;?>&subbagian=<?=$subbagian;?>&action=confirmed">
    <ul>
    	<li class="header"><span>Akun</span></li>
        <li><span>
            <label>Username :</label>
            <span class="confirm"><?=$username;?></span>
			<input type="hidden" name="username" value="<?=$username;?>" />
        </span></li>
        <li><span>
            <label>Password:</label>
            <span class="confirm"><?=$password;?></span>
			<input type="hidden" name="password" value="<?=$password;?>" />
        </span></li>
	</ul>
	<ul>
		<li class="header"><span>Otorisasi</span></li>        
        <li class="desc">
			<span class="col1">Halaman</span>
			<span class="col5">Peran</span>
		</li>
		<?php
		$no = 0;
		foreach($item->role as $i=>$role){
			$no++;
			$sub_bagian = $item->sub_bagian[$i];
		?>
		<li>
			<label><span><?=$no;?></span></label>
			<span class="confirm_sub_bagian"><?=$sub_bagian;?></span>
			<span class="confirm_role"><?=$helper[$role];?></span>
			<input type="hidden" name="subbagian[]" value="<?=$sub_bagian;?>" />
			<input type="hidden" name="role[]" value="<?=$role;?>" />
		</li>
		<?php
		}?>
    </ul>
	<ul>
		<li class="header"><span>Simpan</span></li>
		<li class="button"><span>
			<input type="submit" name="submit" id="submit" value="Simpan Data" class="simpan"/>
		</span></li>
	</ul>
</form>
